import request2 from '@/utils/request2'
import { contractApiUrl } from '../../config'


export default {
    // 新增风险要素清单
    createByRiskFactors(data, params) {
        return request2({
            url: contractApiUrl + '/risk_factors/createByRiskFactors', method: 'post', params, data
        })
    },
    // 刪除風險要素清單
    deleteByRiskFactors(data, params) {
        return request2({
            url: contractApiUrl + '/risk_factors/deleteByRiskFactors', method: 'post', params, data
        })
    },
    // 編輯風險要素清單
    editByRiskFactors(data, params) {
        return request2({
            url: contractApiUrl + '/risk_factors/editByRiskFactors', method: 'post', params, data
        })
    },
    // 风险要素清单分页查询
    findListByMain(data, params) {
        return request2({
            url: contractApiUrl + '/risk_factors/findListByMain', method: 'get', params, data
        })
    },
    // 风险要素清单详情
    findListByMainId(data, params) {
        return request2({
            url: contractApiUrl + '/risk_factors/findListByMainId/' + params.id, method: 'get', params, data
        })
    },
    // 風險要素清單-提交審批
    submitApply(data, params) {
        return request2({
            url: contractApiUrl + '/risk_factors/submitApply/' + data.id, method: 'post', params, data
        })
    }
}
